package com.sdtv.basemodule.rx.errorhandler;

import android.content.Context;

/**
 * @ProjectName: MediunFusion
 * @Package: com.sdtv.basemodule.rx.errorhandler
 * @ClassName: ErrorHandlerFactory
 * @Description: java类作用描述
 * @Author: 小郭同学
 * @CreateDate: 2019-06-21 14:46
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class ErrorHandlerFactory {

    private Context mContext;
    private ResponseErrorListener mResponseErrorListener;

    public ErrorHandlerFactory(Context mContext, ResponseErrorListener mResponseErrorListener) {
        this.mResponseErrorListener = mResponseErrorListener;
        this.mContext = mContext;
    }

    /**
     * 处理错误
     *
     * @param throwable
     */
    public void handleError(Throwable throwable) {
        mResponseErrorListener.handleResponseError(mContext, throwable);
    }
}
